import { IFeidaoAiBrowserComponent } from '@feidao/web/interfaces';
import Tree from '@feidao/widgets/fd-w000001';

export default async function a007(fd: IFeidaoAiBrowserComponent, ...args: any[]) {
	const close_content = fd.data.node.querySelector<HTMLInputElement>('[data-feidao-id="close-id"]').value;
	if (!close_content) {
		alert('请输入打开节点的id');
	} else {
		const tree = fd.data.node.querySelector<Tree>('#fd-w000001-001');
		tree.close(close_content);
	}
	fd.data.node.querySelector<HTMLTextAreaElement>('[data-feidao-id="fd-w000001-005"]').innerHTML = `const close_content = fd.data.node.querySelector<HTMLInputElement>('[data-feidao-id="close-id"]').value;
if (!close_content) {
	alert('请输入打开节点的id');
} else {
	const tree = fd.data.node.querySelector<Tree>('#fd-w000001-001');
	tree.close(close_content);
}`;
}
